feat(demo): seed from scriptor-cms.dev snapshot instead of programmatic#53
Merged
Conversation
The demo container used to invent a "Hello, world" page in code via docker/seed-demo.php. That diverged from the real Scriptor home site (https://scriptor-cms.dev / live mirror scriptor.cms) which has the canonical Scriptor demo content — themed pages, Articles with sample posts, Contact + Footer Pages hierarchy, real Unsplash imagery. This makes the Docker demo show the SAME site as production: docker/seed-demo.sql — sqlite3 dump captured via `vendor/bin/imanager dump` (full schema + data, 93 lines) docker/seed-demo-uploads.tar.gz — public/uploads/ for the three referenced image dirs (568 KB, ustar format to keep alpine busybox tar quiet) The entrypoint now restores the snapshot on first start (no DB), then runs schema:migrate so a dump captured on an older schema is caught up if the image carries newer migrations. The programmatic seed-demo.php is gone. Admin credentials in the seed match scriptor.cms: admin / gT5nLazzyBob — bcrypt-hashed. Refreshing the seed when scriptor.cms content evolves: vendor/bin/imanager dump --db=data/imanager.db > docker/seed-demo.sql COPYFILE_DISABLE=1 tar --format=ustar -czf docker/seed-demo-uploads.tar.gz \ -C public uploads/<referenced-subdirs> Verified locally on macOS Docker 28.1: - up -d --build → seed restored, no tar warnings, all 8 pages routable (incl. nested /some-pages/legal-notice/), uploaded images served from /uploads/. - down (no -v) + up → entrypoint sees DB, skips seed, state preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The demo container used to invent a "Hello, world" page in code via docker/seed-demo.php. That diverged from the real Scriptor home site (https://scriptor-cms.dev / live mirror scriptor.cms) which has the canonical Scriptor demo content — themed pages, Articles with sample posts, Contact + Footer Pages hierarchy, real Unsplash imagery.
This makes the Docker demo show the SAME site as production:
docker/seed-demo.sql — sqlite3 dump captured via
vendor/bin/imanager dump(full schema + data, 93 lines)
docker/seed-demo-uploads.tar.gz — public/uploads/ for the three
referenced image dirs (568 KB,
ustar format to keep alpine
busybox tar quiet)
The entrypoint now restores the snapshot on first start (no DB), then runs schema:migrate so a dump captured on an older schema is caught up if the image carries newer migrations. The programmatic seed-demo.php is gone.
Admin credentials in the seed match scriptor.cms: admin / gT5nLazzyBob — bcrypt-hashed.
Refreshing the seed when scriptor.cms content evolves:
vendor/bin/imanager dump --db=data/imanager.db > docker/seed-demo.sql
COPYFILE_DISABLE=1 tar --format=ustar -czf docker/seed-demo-uploads.tar.gz
-C public uploads/
Verified locally on macOS Docker 28.1: